package com.payment;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.text.SimpleDateFormat;
import java.util.Date;

// 开启缓存注解
@EnableCaching
// 自定义数据源一定要排除SpringBoot自动配置数据源，不然会出现循环引用的问题，The dependencies of some of the beans in the application context form a cycle
//项目启动的注解：并且排除自动注入数据源的配置，可以自定义配置多数据源
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})

//开启异步任务
@EnableAsync

//开启定时启动功能
@EnableScheduling

/**
 * @author lm
 * @date 2020/7/30 16:52
 */
public class PaymentApplication {

    public static void main(String[] args) {
        try {
            SpringApplication.run(PaymentApplication.class, args);
        } catch (Exception e) {
            e.printStackTrace();
        }


    }


}
